-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added an SVG diagram of the vocabulary. #1236
Conversation
Wow pictures help... I think the styling on reserved vs actual properties is probably too similar... And I wonder why we need: https://www.w3.org/2018/credentials/#VerifiableCredentialGraph ^ assuming this is normative, why do implementers need to understand it, and how is it different from: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Ok. I could change the background color to a different shade... would that be better?
How is it different from: the former is the "envelope" that contains the latter. Just as the envelope is not the same as what it contains, the Why do implementers need to understand it: the question is which implementer you are talking about. I do not think there is a single answer. It is like asking whether implementers need to understand the exact mathematics behind b-spline curves, ray tracing or, closer to the topics, the RSA algorithm or elliptic curves. Clearly, those must be defined somewhere, but many implementers will ignore those details and use some existing tools as black boxes. Please, let us not dive into this in this PR, however. The diagram illustrates what is in the vocabulary, it does not introduce anything new. If you want to follow up this discussion, there should be a separate issue for this. |
Nice! Can never say no to eye candy in these spaces =) Don't mean to hijack the thread here - and can move discussion elsewhere - on generating SVG diagrams from (cough) RDF, but is anyone aware of current tools to autogenerate the diagrams (with optional interactions)? https://www.w3.org/RDF/Validator/ still offers an SVG view which is generally useful but not particularly pleasing, understandably, especially when there is more than a handful of triple statements. For a category of diagrams that need to convey more meaning in the view beyond the raw underlying information, I understand that there needs to be more hands-on work. I was just hoping to see what's out there that closes that gap. |
Thannks.
Yes, better move this discussion elsewhere. The short answer is that I did not find anything. |
@iherman thanks for this PR.
Yes, I think that would be better.
I filed #1240 to follow up on VerifiableCredentialGraph |
Answering here because @iherman didn't find such, either -- I have been informed that ChatGPT can do such a thing. I have not tested it myself. You both seem motivated, so I leave you with the temptation. |
The issue was discussed in a meeting on 2023-08-15
View the transcript1.6. Added an SVG diagram of the vocabulary. (pr vc-data-model#1236)See github pull request vc-data-model#1236. Brent Zundel: next PR...1236 Added an SVG diagram of the vocabulary. only a couple of days old. could use more review. raised by Ivan.
|
I have changed the background color for the reserved properties. For the preview, do not forget to clean the cache (I had to explicitly clear it to get the right version via github.io). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally in favour of these changes, but two things stand out:
1: could we not use SVGO to clean up the file? It's not bad in this case, but proper indentation makes looking at diffs easier
2: could we not also automate the removal of the height
and width
parameters? It is XML after all
Preamble: I would prefer to continue this discussion either by email or via a separate issue. The SVG diagram will change as the VCDM spec evolves, so this PR is really on
And I would prefer to merge this PR as soon as everyone is o.k. with it, knowing that the SVG tool chain is still in flux. On that I am happy to chat with you every time :-) Responding to your comments. First of all: thanks for the pointer to the svgo tool. I did not know about it; I have installed it and indeed looks great. I tried it on the output of draw.io, and it formatted the file nicely, which is great. Interestingly, by default it removed the width and height attributes from the top level svg element, so it also takes care of your second remark. It compressed some attributes (like the path expressions or the color settings) which is good, although not affecting the overall size of the file too much. However, whether it would be used on long term or not still depends on the final tool chain. I use draw.io because it works fairly well for this type of diagrams and exports a very decent SVG (in contrast to google's draw, which exports everything in path statements, hiding all the structure and text). However, it still relies on its own format, which it exports to SVG. Inkscape, the other tool I was referring to, uses SVG as its core format, and it does that by adding its own attributes to the file. If I succeed in finding a way of navigating around the bugs of inkscape, and I would use that tool instead of draw.io, then svgo may not be a good idea because it may remove attributes that inkscape actually needs... Something to be checked. |
Co-authored-by: Oliver Terbu <[email protected]> Co-authored-by: Ted Thibodeau Jr <[email protected]>
For the records: the branch has been rebased to the latest main, ie, the initial remark:
is now moot. |
@dlongley @msporny for the records: following w3c/vc-data-integrity#171 (comment) I have also updated the vcdm diagram for dark mode... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @iherman!
Editorial, multiple reviews, changes requested and made, no objections, merging. |
Looking at https://w3c.github.io/yml2vocab/previews/vcdm/vocabulary.svg, the key does not match the diagram, at least for Reserved Property. Suggestions I made on the other diagram about the Domain and Range connectors also apply here. |
Just for the records: I have made both changes on my machine, thanks. Needs some more testing; I will refresh the version on the repo at a later PR. |
I have created an overview diagram for the vocabulary, and added to the vocabulary description.
As usual, the preview of this should be through
https://w3c.github.io/yml2vocab/previews/vcdm/vocabulary.html
The embedded diagram is in SVG (with all boxes acting as links, b.t.w.), and the SVG file can also be downloaded directly as
https://w3c.github.io/yml2vocab/previews/vcdm/vocabulary.svg
Note that this diagram anticipates the confidence method presence (ie, #1228) although the vocabulary text itself does not have it yet; that is because the branch is from the "main" branch (to avoid possible merge conflicts later). That also explains why respec issue warning on two missing links.
The original source of the diagram is at:
https://drive.google.com/file/d/1-kg7AzhahSzIwiIHeh5ANGJB_JK-kugs/view?usp=drive_link
which is a draw.io file. I tried to create/edit the SVG file directly using inkscape (and, actually, that program can be used to change/edit the resulting SVG file itself) but, alas!, the connecting line feature is buggy in inkscape, and it works perfectly well in draw.io. Sigh...
This is definitely not a pre-CR feature, but it definitely helps to possibly find problems in the vocabulary.
(I have a similar diagram coming up for the security vocabulary, but I wait until the PR storm is over for that spec before finalizing the diagram which, obviously, is much more complex.)